<!--头部-->
<?php //  	分配分类
use Common\Model\Category;
		$cateModel=new Category;
		$pid=$cateModel->where("cname='级别'")->pluck('cid');
//		p($pid);exit;
    	$cateData=$cateModel->where("pid!=0 and pid={$pid}")->get();
//		p($cateData);exit;
		View::with('cateData',$cateData);?>
		<div id="top">			
			<ul class="top_long">
				<a href="<?php echo U('Index/index')?>"><div class="qczj"><img src="./Public/Home/imgs/logo-auto-92438.png"/></div></a>			
				<a href="<?php echo U('Dingdan/index')?>"><li myOrder>我的订单</li></a>	
				<span class="shu">|</span>

				<?php if(isset($_SESSION['uid'])): ?>
				<a href="<?php echo U('Member/out')?>"><li class="login">退出 </li></a>
					
				<a href="<?php echo U('Member/index')?>"><li class="login"><?php echo $_SESSION['username']?> </li></a>


				<?php else :?>
				<a href="<?php echo U('Member/reg')?>"><li class="register">注册</li></a>
					
				<a href="<?php echo U('Member/login')?>"><li class="login">登录 </li></a>
				<?php endif ?>
			</ul>
			
		</div>
		<!--大盒子-->
		<div id="box">
			<!--搜索开始-->
			<div id="search">
					<a href="<?php echo U('Index/index')?>"> <img class="tupian" src="./Public/Home/imgs/header-logo-mall-363de.png"/></a>
					<div id="search_in">
						<form action='<?php echo U("home/List/ss")?>' method='post'>
							<input type="text" name="ss" id="" value="" placeholder="请输入关键字" />
							<input type='submit' class="sousuo" value='搜索'>
						</form>
					</div>				
					<div class="gouwu">
						<i class="gw_tp"></i>
						<i class="dayu">&gt;</i>
						<?php if(isset($_SESSION['cart']['goods'])):?>
						<i class="shuzi"><?php echo count($_SESSION['cart']['goods'])?></i>
						<?php else: ?>
						<i class="shuzi">0</i>	
						<?php endif ?>		
						<a target="_blank" href="<?php echo U('Cart/index')?>" >我的购物车</a>
					</div>		
			</div>
			<!--搜索结束-->
			<!--分类导航-->
			<div id="category">
				<ul>
					<a href=""><li class="first">全部分类</li></a>
					<a href="<?php echo U('Index/index')?>"><li class="second">首页</li></a>
					<?php foreach ($cateData as $v){?>
					<a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>"><li class="three"><?php echo $v['cname']?></li></a>
					<?php }?>
					<!--<a href=""><li class="three">级别</li></a>-->
					<!--<a href=""><li class="four">分期购车</li></a>
					<a href=""><li class="three">定制车</li></a>-->
				</ul>			
			</div>